/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/2/27.
	 */
	var Breadcrumb = __webpack_require__(7);
	var Pagination = __webpack_require__(21);
	var Calculator = __webpack_require__(32);
	var ProjectSelect = __webpack_require__(54);
	var ProjectList = __webpack_require__(55);
	var Root = React.createClass({displayName: "Root",
	    getInitialState: function(){
	        return {
	            pageVal: PageDM.pagination.value,
	            projectListVal: PageDM.projectList.value,
	            interestVal: PageDM.interest.option[0].value,
	            durationVal: PageDM.duration.option[0].value,
	            projectStatusVal: PageDM.projectStatus.option[0].value
	        }
	    },
	    interestHandler: function(v){
	        PageDM.interest.setValue(v);
	        PageDM.interest.onClick();
	    },
	    durationHandler: function(v){
	        PageDM.duration.setValue(v);
	        PageDM.duration.onClick();
	    },
	    projectStatusHandler: function(v){
	        PageDM.projectStatus.setValue(v);
	        PageDM.projectStatus.onClick();
	    },
	    componentDidMount: function(){
	        var _this = this;
	        UEventHub.emit("pageLoad","hello world!");
	        UEventHub.on(PageDM.pagination.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            //console.log(v)
	            /*_this.setState({
	                pageVal: v
	            });*/
	        });
	        UEventHub.on(PageDM.projectList.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                projectListVal: v
	            });
	        });
	        UEventHub.on(PageDM.interest.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                interestVal: v
	            });
	        });
	        UEventHub.on(PageDM.duration.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                durationVal: v
	            });
	        });
	        UEventHub.on(PageDM.projectStatus.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                projectStatusVal: v
	            });
	        });
	        //筛选条件，默认为第一个（全部）
	        PageDM.interest.setValue(PageDM.interest.option[0].value);
	        PageDM.duration.setValue(PageDM.duration.option[0].value);
	        PageDM.projectStatus.setValue(PageDM.projectStatus.option[0].value);
	    },
	    calculatorHandler: function(){
	        this.refs['calculator'].layerOpen();
	    },
	    render: function(){
	        var _this = this;
	        //年化利率筛选条件
	        var _interest_data = {
	            label: "年化利率：",
	            selectOption: PageDM.interest.option,
	            curVal: _this.state.interestVal
	        };
	        //投资期限筛选条件
	        var _duration_data = {
	            label: "投资期限：",
	            selectOption: PageDM.duration.option,
	            curVal: _this.state.durationVal
	        };
	        //项目状态筛选条件
	        var _projectStatus_data = {
	            label: "项目状态：",
	            selectOption: PageDM.projectStatus.option,
	            curVal: _this.state.projectStatusVal
	        }
	        return (
	            React.createElement("div", null, 
	                React.createElement("div", {className: "header"}, 
	                    React.createElement("div", {className: "top-bar fc-light"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("span", null, "服务热线：0816-2373017"), 
	                            React.createElement("span", null, "服务时间：工作日 9:00-18:00"), 
	                            React.createElement("span", {className: "nav-right"}, 
	                                React.createElement("a", {href: "登录注册/登录.html"}, "登录"), 
	                                React.createElement("a", {href: "登录注册/注册.html"}, "注册"), 
	                                React.createElement("a", {href: "帮助中心/平台介绍.html"}, "帮助中心"), 
	                                React.createElement("a", {href: "index.html"}, "返回绵阳商业银行")
	                            )
	                        )
	                    ), 
	                    React.createElement("div", {className: "header-nav"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("div", {className: "logo f-left"}, React.createElement("a", {href: "index.html"}, React.createElement("img", {src: "../images/logo.jpg", alt: ""}), " "), React.createElement("a", {href: "index.html"}, React.createElement("img", {src: "../images/logoe.jpg", alt: ""}), " ")), 
	                            React.createElement("div", {className: "nav f-right"}, 
	                                React.createElement("ul", {className: "clearfix"}, 
	                                    React.createElement("li", null, React.createElement("a", {href: "index.html"}, "首页")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "我要投资.html", className: "current"}, "我要投资")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "我要借款.html"}, "我要借款")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "账户中心/我的账户.html"}, "我的账户"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "clear"})
	                        ), 
	                        React.createElement("div", {className: "shadow"})
	                    )
	                ), 
	                React.createElement("div", {className: "container"}, 
	                    React.createElement(Breadcrumb, {	separator: ">"}, 
	                        React.createElement(Breadcrumb.Item, {href: PageDM.URL.home}, "首页"), 
	                        React.createElement(Breadcrumb.Item, null, "我要投资")
	                    ), 
	                    React.createElement("div", {className: "mod-filtrate clearfix"}, 
	                        React.createElement("span", {className: "angle angle-top"}), 
	                        React.createElement("span", {className: "angle angle-bottom"}), 
	                        React.createElement(ProjectSelect, {data: _interest_data, callBack: _this.interestHandler}), 
	                        React.createElement(ProjectSelect, {data: _duration_data, callBack: _this.durationHandler}), 
	                        React.createElement(ProjectSelect, {data: _projectStatus_data, callBack: _this.projectStatusHandler}), 
	                        React.createElement("div", {className: "project-calculator"}, React.createElement("a", {href: "javascript:;", className: "open-calculator", onclick: _this.calculatorHandler.bind(_this)}, React.createElement("i", {className: "bg-icon"}), " ", React.createElement("p", null, "投资计算器")))
	                    ), 
	                    React.createElement(ProjectList, {projectList: _this.state.projectListVal}), 
	                    React.createElement(Pagination, {paginationDM: PageDM.pagination, pageVal: _this.state.pageVal})
	                ), 
	                React.createElement("div", {className: "footer"}, 
	                    React.createElement("div", {className: "container"}, 
	                        React.createElement("div", {className: "footer-logo f-left"}, 
	                            React.createElement("p", {className: "logo-foot"}, React.createElement("img", {src: "../images/foot-logo.png", alt: ""})), 
	                            React.createElement("p", {className: "txt"}, "2005－2013 绵阳市商业银行股份有限公司 ", React.createElement("a", {href: "http://www.miitbeian.gov.cn", target: "_blank"}, "粤ICP备11013283123号"))
	                        ), 
	                        React.createElement("div", {className: "footer-nav f-right"}, 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "关于我们"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/平台介绍.html"}, "平台介绍")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/名词解释.html"}, "名词解释")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/联系我们.html"}, "联系我们")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/服务协议.html"}, "服务协议"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "安全保障"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "项目安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "资金安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "信息安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "账户安全"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "帮助中心"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/投资操作指引.html"}, "投资指引")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/融资操作指引.html"}, "融资指引")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/平台公告.html"}, "平台公告")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "javascript:;"}, "常见问题"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col col-service"}, 
	                                React.createElement("p", null, "客服专线", React.createElement("br", null), "0816-2373017"), 
	                                React.createElement("p", null, "服务时间", React.createElement("br", null), "工作日9:00 - 18:00")
	                            )
	                        ), 
	                        React.createElement("div", {className: "clear"})
	                    )
	                ), 
	                React.createElement(Calculator, {ref: "calculator"})
	            )
	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null), document.getElementById('main'));

/***/ },

/***/ 2:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/14.
	 */
	var Button = __webpack_require__(3);
	//查询样式是否存在
	function hasClass(elem, cls) {
	    elem = elem || {};
	    return new RegExp("\\b" + cls + "\\b").test(elem.className);
	}
	//添加样式
	function addClass(elem, cls) {
	    elem = elem || {};
	    hasClass(elem, cls) || (elem.className += " " + cls);
	    elem.className = elem.className.replace(/^\s|\s$/g, "").replace(/\s+/g, " ");
	}
	//删除样式
	function removeClass(elem, cls) {
	    elem = elem || {};
	    if (hasClass(elem, cls)) {
	        elem.className = elem.className.replace(new RegExp("(\\s|^)" + cls + "(\\s|$)"), "");
	    }
	};
	//obj为要绑定事件的元素，ev为要绑定的事件，fn为绑定事件的函数
	function myAddEvent(obj, ev, fn) {
	    if (obj.attachEvent) {
	        obj.attachEvent("on" + ev, fn);
	    }
	    else {
	        obj.addEventListener(ev, fn, false);
	    }
	}
	function myRemoveEvent(obj, ev, fn) {
	    if (obj.attachEvent) {
	        obj.detachEvent("on" + ev, fn);
	    }
	    else {
	        obj.removeEventListener(ev, fn, false);
	    }
	}

	var Layer = React.createClass({displayName: "Layer",
	    getDefaultProps: function () {
	        return {
	            display: false,
	            type: "",
	            width: "",
	            height: "",
	            className: "",
	            showClose: true,
	            closeBack: "",
	            position: "fixed",
	            confirm: "",
	            confirmBack: "",
	            cancel: "",
	            cancelBack: "",
	            afterBack: "",
	            animation: "layer-anim-1",
	            maskLayer: true,
	            shadeClose: false,
	            move: true,
	            autoClose: 0,
	            id: "",
	            left: "",
	            top: "",
	            contentHeight: "" //内容区域高
	        }
	    },
	    componentDidMount: function () {
	        myAddEvent(window, 'resize', this._handleResize.bind(this));
	    },
	    layerOpen: function () {
	        var _this = this;
	        this.refs.ucslayer.style.display = "block";
	        addClass(this.refs.ucslayer,this.props.animation);
	        this._setPosition();
	        //添加遮罩层
	        this.props.maskLayer ? this._maskLayer() : "";
	        //窗口加载完回调
	        this.props.afterBack ? this.props.afterBack() : "";
	        //计算倒计时
	        this.props.autoClose > 0 ? this._handleCountdown() : "";
	    },
	    layerClose: function () {
	        this.refs.ucslayer.style.display = "none";
	        removeClass(this.refs.ucslayer,this.props.animation);
	        //移除遮罩层
	        document.body.removeChild(this.divEL);
	        if (this.props.shadeClose) {
	            myRemoveEvent(this.divEL, 'click', this._handleMaskLayerClick);
	            //this.divEL.removeEventListener('click', this._handleMaskLayerClick);
	        }
	        // this.props.closeBack ? this.props.closeBack() : "";
	        clearInterval(this.timer);
	    },
	    _handleResize: function () {
	        //console.log("窗口改变");//传个参数进去，浏览器窗口缩放时不修改弹出层的宽高，只调整位置保持居中
	        //确保窗口在显示状态才执行缩放，隐藏下取不到高
	        this.refs.ucslayer.style.display === "block" ? this._setPosition("resize") : "";
	    },
	    _handleCountdown: function () {
	        //倒计时
	        clearInterval(this.timer);
	        var i = this.props.autoClose;
	        this.timer = setInterval(function () {
	            i--;
	            this.refs.autoClose.innerHTML = i;
	            if (i == 0) {
	                this.layerClose();
	            }
	        }.bind(this), 1000);
	    },
	    _maskLayer: function () {
	        this.divEL = document.createElement('div');
	        this.divEL.className = "layer-background";
	        document.body.appendChild(this.divEL);
	        this.props.shadeClose ?
	            myAddEvent(this.divEL, 'click', this._handleMaskLayerClick) : "";
	        //this.divEL.addEventListener("click", this._handleMaskLayerClick) : "";
	    },
	    _handleMaskLayerClick: function () {
	        //遮罩层点击
	        this.layerClose();
	    },
	    _setPosition: function (t) {
	        //浏览器窗口宽高兼容写法
	        this.windowWidth = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.scrollWidth;
	        this.windowHeight = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight;

	        //如果设定了高宽，则使用设定的
	        this.layerWidth = this.props.width ? this.props.width : this.refs.ucslayer.offsetWidth;
	        this.layerHeight = this.props.height ? this.props.height : this.refs.ucslayer.offsetHeight;
	        this.layerHeight = this.layerHeight > this.windowHeight ? this.windowHeight : this.layerHeight;//如果弹层高度大于浏览器窗口高，则使用浏览器窗口高
	        var scrollTop = 0;// 滚动条的高度
	        if (this.props.position == "absolute") {
	            if (document.documentElement && document.documentElement.scrollTop) {
	                scrollTop = document.documentElement.scrollTop;
	            }
	            else if (document.body) {
	                scrollTop = document.body.scrollTop;
	            }
	        }
	        var left = (parseInt(this.windowWidth) - parseInt(this.layerWidth)) / 2;
	        var top = (parseInt(document.body.clientHeight) - parseInt(this.layerHeight)) / 2;
	        if (t !== "resize") {
	            this.refs.ucslayer.style.width = this.layerWidth;
	            this.refs.ucslayer.style.height = this.layerHeight;
	        }
	        this.refs.ucslayer.style.left = left + "px";
	        this.refs.ucslayer.style.top = top < 0 ? 0 : top + "px";
	        if(this.refs.layerHeader){
	            this.refs.layerContent.style.height = parseInt(this.layerHeight) - parseInt(this.refs.layerHeader.offsetHeight);
	        }else{
	            this.refs.layerContent.style.height = parseInt(this.layerHeight);
	        }

	    },
	    _handleCloseClick: function () {
	        //点击关闭时
	        this.props.closeBack ? this.props.closeBack() : this.layerClose();
	    },
	    _handleConfirmClick: function () {
	        //确认按钮点击时
	        this.props.confirmBack ? this.props.confirmBack() : this.layerClose();
	    },
	    _handleCancelClick: function () {
	        //取消按钮点击时
	        this.props.cancelBack ? this.props.cancelBack() : this.layerClose();
	    },
	    _handleMousedown: function (e) {
	        if (this.props.move) {
	            this.mx = e.pageX - parseInt(this.refs.ucslayer.style.left);
	            this.my = e.pageY - parseInt(this.refs.ucslayer.style.top);
	            this.move = true;
	            myAddEvent(document, 'mousemove', this._handleMouseMove.bind(this));
	            myAddEvent(document, 'mouseup', this._handleMouseUp.bind(this));
	        }
	    },
	    _handleMouseMove: function (e) {
	        if (this.move) {
	            e = event || window.event;
	            var x = e.clientX - parseInt(this.mx);
	            var y = e.clientY - parseInt(this.my);

	            var documentHeight = document.documentElement.clientHeight;
	            if (x <= 0) {
	                x = 0
	            } else if (x > parseInt(this.windowWidth) - parseInt(this.layerWidth)) {
	                //window窗口宽－弹层宽
	                x = parseInt(this.windowWidth) - parseInt(this.layerWidth)
	            }
	            if (y <= 0) {
	                y = 0
	            } else if (y > documentHeight - parseInt(this.layerHeight)) {
	                y = documentHeight - parseInt(this.layerHeight)
	            }
	            this.refs.ucslayer.style.left = x + "px";
	            this.refs.ucslayer.style.top = y + "px";
	            return false;
	        }
	    },
	    _handleMouseUp: function () {
	        this.move = false;
	        myRemoveEvent(document, 'mousemove', this._handleMouseMove.bind(this));
	        myRemoveEvent(document, 'mouseup', this._handleMouseUp.bind(this));

	    },
	    render:function(){
	        var props = this.props;
	        var style = "width:" + props.width + ";" + "height:" + props.height + ";" + "display:"+(props.display ? "block;" : "none;")+ "position:"+ props.position+";";
	        var bodyClass = "ucs-layer-body "+(props.type?"ucs-layer-text":"");
	        var bodyContent = "";
	        if (props.type === "text") {
	            //纯文字
	            bodyContent = (React.createElement("div", {className: "ucs-layer-txt"}, props.children));
	        } else if (props.type === "success") {
	            //成功时
	            bodyContent = (
	                React.createElement("div", {className: "ucs-layer-success"}, 
	                    React.createElement("i", {className: "iconfont icon-success icon"}), 
	                    props.children
	                )
	            )
	        }
	        else if (props.type === "failure") {
	            //失败时
	            bodyContent = (
	                React.createElement("div", {className: "ucs-layer-failure"}, 
	                    React.createElement("i", {className: "iconfont icon-failure icon"}), 
	                    props.children
	                )
	            )
	        } else {
	            //其它
	            bodyContent = props.children
	        }
	        var close = (
	                props.showClose ? React.createElement("a", {href: "javascript:;", className: "ucs-layer-close", onclick: this._handleCloseClick.bind(this)}) : ""
	            )
	            ;
	        var button = "";
	        if (props.confirm || props.cancel) {
	            button = (
	                React.createElement("div", {className: "ucs-layer-footer"}, 
	                    props.confirm ? React.createElement(Button, {onclick: this._handleConfirmClick.bind(this), buttonType: "confirm", value: props.confirm}) : "", 
	                    props.cancel ? React.createElement(Button, {onclick: this._handleCancelClick.bind(this), buttonType: "cancel", value: props.cancel}) : ""
	                )
	            );
	        }
	        var autoClose = (
	            this.props.autoClose > 0 ? React.createElement("div", {className: "ucs-autoclose"}, React.createElement("span", {ref: "autoClose"}, this.props.autoClose), "秒后自动关闭!") : ""
	        );
	        var moveStyle = "cursor:"+(this.props.move ? "move;" : ";");
	        return (
	            React.createElement("div", {className: "ucs-layer "+props.className+" "+props.animation, style: style, ref: "ucslayer", id: this.props.id}, 
	                close, 
	                props.title ? React.createElement("div", {className: "ucs-layer-header", onmousedown: this._handleMousedown.bind(this), ref: "layerHeader", style: moveStyle}, props.title) : "", 
	                autoClose, 
	                React.createElement("div", {className: "ucs-layer-content", ref: "layerContent", style: "height:"+props.contentHeight+";"}, 
	                    React.createElement("div", {className: bodyClass}, bodyContent), 
	                    button
	                )
	            )
	        )
	    }
	});

	module.exports = Layer;

/***/ },

/***/ 3:
/***/ function(module, exports) {

	var Button = React.createClass({displayName: "Button",
		config:{
	        id:""
	    },
		render: function() {
			var customClassNameArr=this.props.className?this.props.className.split(' '):'';
	        var customClassName ='ucs-btn';
	        if(customClassNameArr.length>0){
	            for(var i=0;i<customClassNameArr.length;i++){
	                customClassName=customClassNameArr[i]+' '+customClassName;
	            }
	        }
			this.props.className = customClassName;
			var id = this.props.id?this.props.id:'';
			if(this.props.href){
				return React.createElement("a", {id: id, onclick: this.props.onclick, className: this.props.className, href: this.props.href}, this.props.value)
			}else{
				return React.createElement("button", {id: id, onclick: this.props.onclick, className: this.props.className}, this.props.value)
			}
		}
	})
	module.exports = Button;

/***/ },

/***/ 7:
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/3/23.
	 */

	var Breadcrumb = React.createClass({displayName: "Breadcrumb",
	    getDefaultProps: function(){
	        return{
	            separator:'>'   //分隔符
	        }
	    },
	    render: function(){
	        var that = this;
	        var len = this.props.children.length;
	        return (
	            React.createElement("div", {className: "ucs-breadcrumb"}, 
	                
	                    this.props.children.map(function (child,index) {
	                        if(index == len-1){
	                            return React.createElement("span", {className: "ucs-breadcrumb-link-last"}, child);
	                        }else{
	                            return React.createElement("span", null, child, React.createElement("span", {className: "ucs-breadcrumb-separator"}, that.props.separator));
	                        }
	                    })
	                
	            )
	        )
	    }
	});
	Breadcrumb.Item = React.createClass({displayName: "Breadcrumb.Item",
	    render: function () {
	        return (
	            this.props.href ?
	                React.createElement("a", {href: this.props.href}, this.props.children) :
	                React.createElement("span", null, this.props.children)
	        )
	    }
	});

	module.exports = Breadcrumb;

/***/ },

/***/ 9:
/***/ function(module, exports) {

	/**
	 * Created by DuHuiling on 2017/3/21.
	 */

	var Countdown = React.createClass({displayName: "Countdown",
	    getDefaultProps:function(){
	        return{
	            timeRemaining:"2017-04-01 0:0:0",
	            tpl:"{d}天{h}时{m}分{s}秒",
	            overCallback:function(){}
	        }
	    },
	    countdownTime:null,
	    start:function(){
	        var _this = this;
	        _this.countdownTime = setInterval(function(){
	            _this._init();
	        },1000);
	    },
	    stop:function(){
	        clearTimeout(this.countdownTime);
	    },
	    over:function(){
	        this.stop();
	        console.warn("时间已过");
	        this.props.overCallback();
	    },
	    _init:function(){
	        var _start = new Date(this.props.timeRemaining).getTime(),
	            _now = new Date().getTime(),
	            second = _start - _now;
	        this._countdown(second);
	    },
	    _countdown:function(second){
	        var _node = this.refs.countdown;
	        var _this = this;
	        if(second < 0){
	            _this.over();
	            return;
	        }
	        var _ts = second / 1000 / 60 / 60 % 24,
	            _d = parseInt(second / 1000 / 60 / 60 / 24),    //得到天数
	            _h = parseInt(_ts),      //得到小时
	            _m = parseInt((_ts - _h) * 60),        //得到分钟
	            _s = Math.floor(((_ts - _h) * 60 - _m) * 60);        //得到秒数

	        var format = this.props.tpl, numArr = [], formatArr = [];
	        if(format.indexOf("{d}") >= 0){
	            numArr.push({
	                value:_d,
	                className:"ucs-count-day"
	            });
	        }
	        if(format.indexOf("{h}") >= 0){
	            numArr.push({
	                value:_h,
	                className:"ucs-count-hour"
	            });
	        }
	        if(format.indexOf("{m}") >= 0){
	            numArr.push({
	                value:_m,
	                className:"ucs-count-min"
	            });
	        }
	        if(format.indexOf("{s}") >= 0){
	            numArr.push({
	                value:_s,
	                className:"ucs-count-sec"
	            });
	        }

	        format = format.replace("{d}","-");
	        format = format.replace("{h}","-");
	        format = format.replace("{m}","-");
	        format = format.replace("{s}","-");
	        formatArr = format.split('-');

	        var innHtml = (
	            React.createElement("span", null, 
	                
	                    numArr.map(function(v,index){
	                        var _v = v.value.toString();
	                        return React.createElement("p", null, React.createElement("span", {className: v.className}, _v), formatArr[(index+1)])
	                    })
	                
	            )
	        )

	        ReactDOM.render(innHtml,this.refs.countdown);
	    },
	    componentDidMount:function(){
	        this._init();
	        this.start();
	    },
	    render:function(){
	        return(
	            React.createElement("div", {ref: "countdown", className: "ucs-count"}

	            )
	        )
	    }
	});
	module.exports = Countdown;

/***/ },

/***/ 21:
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/4/11.
	 */
	var Pagination = React.createClass({displayName: "Pagination",
	    render: function(){
	        var _this = this;
	        var pageVal = _this.props.pageVal;
	        var paginationDM = _this.props.paginationDM;
	        var div = document.createElement("div");
	        div.className = "pagination";
	        if(pageVal.totalPage > 1 && pageVal.totalPage <= 7){
	            for(var i = 0; i <= pageVal.totalPage+1; i++){
	                var a = document.createElement("a");
	                a.setAttribute("href","javascript:;");
	                if(i==0){
	                    a.innerHTML = "&lt;";
	                    if(pageVal.curPage > 1){
	                        a.onclick = function(){
	                            paginationDM.value.curPage = pageVal.curPage-1;
	                            paginationDM.onClick();
	                        };
	                    }else{
	                        a.className = "pagination-disabled";
	                    }
	                }else if(i == pageVal.totalPage+1){
	                    a.innerHTML = "&gt;";
	                    if(pageVal.curPage < pageVal.totalPage){
	                        a.onclick = function(){
	                            paginationDM.value.curPage = pageVal.curPage+1;
	                            paginationDM.onClick();
	                        };
	                    }else{
	                        a.className = "pagination-disabled";
	                    }
	                }else{
	                    a.innerHTML = i;
	                    (function(ii){
	                        a.onclick = function(){
	                            paginationDM.value.curPage = ii;
	                            paginationDM.onClick();
	                        };
	                    })(i);
	                    if(i == pageVal.curPage){
	                        a.className = "current";
	                    }
	                }
	                div.appendChild(a);
	            }
	        }else if(pageVal.totalPage > 7){
	            var dotIndex = 0;
	            if(pageVal.curPage<=5 || (pageVal.totalPage - pageVal.curPage) <= 4 ){
	                if((pageVal.curPage - 1) < (pageVal.totalPage - pageVal.curPage)){
	                    dotIndex = 6;
	                }else{
	                    dotIndex = 2;
	                }
	            }
	            for(var i = 0; i < 9; i++){
	                var a = document.createElement("a");
	                a.setAttribute("href","javascript:;");
	                if(i==0){
	                    a.innerHTML = "&lt;";
	                    if(pageVal.curPage > 1){
	                        a.onclick = function(){
	                            paginationDM.value.curPage = pageVal.curPage-1;
	                            paginationDM.onClick();
	                        };
	                    }else{
	                        a.className = "pagination-disabled";
	                    }
	                }else if(i == 8){
	                    a.innerHTML = "&gt;";
	                    if(pageVal.curPage < pageVal.totalPage){
	                        a.onclick = function(){
	                            paginationDM.value.curPage = pageVal.curPage+1;
	                            paginationDM.onClick();
	                        };
	                    }else{
	                        a.className = "pagination-disabled";
	                    }
	                }else{
	                    if(dotIndex == 0){
	                        if(i == 2 || i == 6){
	                            if(i == 2){
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.curPage-3;
	                                    paginationDM.onClick();
	                                };
	                                a.className = "jump-prev";
	                                a.setAttribute("title","Previous 3 Pages");
	                            }else if(i == 6){
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.curPage+3;
	                                    paginationDM.onClick();
	                                };
	                                a.className = "jump-next";
	                                a.setAttribute("title","Next 3 Pages");
	                            }
	                        }else{
	                            if(i == 1){
	                                a.innerHTML = 1;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = 1;
	                                    paginationDM.onClick();
	                                };
	                            }else if(i == 7){
	                                a.innerHTML = pageVal.totalPage;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.totalPage;
	                                    paginationDM.onClick();
	                                };
	                            }else if(i == 3){
	                                a.innerHTML = pageVal.curPage-1;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.curPage-1;
	                                    paginationDM.onClick();
	                                };
	                            }else if(i == 4){
	                                a.innerHTML = pageVal.curPage;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.curPage;
	                                    paginationDM.onClick();
	                                };
	                                a.className = "current";
	                            }else if(i == 5){
	                                a.innerHTML = pageVal.curPage+1;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.curPage+1;
	                                    paginationDM.onClick();
	                                };
	                            }
	                        }
	                    }else if(dotIndex == 2){
	                        if(i == dotIndex){
	                            a.onclick = function(){
	                                paginationDM.value.curPage = pageVal.curPage-3;
	                                paginationDM.onClick();
	                            };
	                            a.className = "jump-prev";
	                            a.setAttribute("title","Previous 3 Pages");
	                        }else{
	                            if(i == 1){
	                                a.innerHTML = 1;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = 1;
	                                    paginationDM.onClick();
	                                };
	                            }else{
	                                a.innerHTML = (pageVal.totalPage-(7-i));
	                                (function(i){
	                                    a.onclick = function(){
	                                        paginationDM.value.curPage = pageVal.totalPage-(7-i);
	                                        paginationDM.onClick();
	                                    };
	                                })(i);
	                            }
	                        }
	                        if((pageVal.totalPage-(7-i)) == pageVal.curPage){
	                            a.className = "current";
	                        }
	                    }else if(dotIndex == 6){
	                        if(i == dotIndex){
	                            a.onclick = function(){
	                                paginationDM.value.curPage = pageVal.curPage+3;
	                                paginationDM.onClick();
	                            };
	                            a.className = "jump-next";
	                            a.setAttribute("title","Next 3 Pages");
	                        }else{
	                            if(i == 7){
	                                a.innerHTML = pageVal.totalPage;
	                                a.onclick = function(){
	                                    paginationDM.value.curPage = pageVal.totalPage;
	                                    paginationDM.onClick();
	                                };
	                            }else{
	                                a.innerHTML = i;
	                                (function(i){
	                                    a.onclick = function(){
	                                        paginationDM.value.curPage = i;
	                                        paginationDM.onClick();
	                                    };
	                                })(i);
	                            }
	                        }
	                        if(i == pageVal.curPage){
	                            a.className = "current";
	                        }
	                    }
	                }
	                div.appendChild(a);
	            }
	        }
	        return (
	            React.createElement("div", null, 
	                div
	            )
	        )
	    }
	});

	module.exports = Pagination;

/***/ },

/***/ 23:
/***/ function(module, exports) {

	/**
	 * 
	 * @constructs 
	 */
	var Progress = React.createClass({displayName: "Progress",
	    getDefaultProps: function() {
	        return {
	            type: 'line',
	            showInfo: true,
	            percent: 0
	        };
	    },
	    render: function(){
	        var showInfo = this.props.showInfo;
	        var info;
	        var infoPos = this.props.infoPosition;
	        var textProps = {};

	        if(showInfo){
	            if(infoPos){
	                typeof (infoPos) == 'object'? (
	                    textProps.style = infoPos
	                ):(
	                    textProps.style = {left:+this.props.percent + "%"}
	                )
	            }
	            textProps.className = 'ucs-progress-text';
	            if("format" in this.props){
	                info = React.createElement("span", {className: textProps.className, style: textProps.style}, this.props.format);
	            }else{
	                info = React.createElement("span", {className: textProps.className, style: textProps.style}, this.props.percent, "%");
	            }
	        }
	        var pClass = this.props.className? 'ucs-progress '+this.props.className:'ucs-progress';
	        return (
	            React.createElement("div", {className: pClass}, 
	                React.createElement("div", {className: "ucs-progress-inner"}, 
	                    React.createElement("span", {className: "ucs-progress-bg", style: {width:+this.props.percent + "%"}})
	                ), 
	                info
	            )
	        )
	    }
	});

	module.exports = Progress;

/***/ },

/***/ 32:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/17.
	 */
	var Layer = __webpack_require__(2);

	var Calculator = React.createClass({displayName: "Calculator",
	    /*计算器验证输入,检查是不是数字及两数位数*/
	    chcknullnum: function(a) {
	        if (!isNaN(a) && a != "") {
	            return a;
	        } else {
	            return false;
	        }
	    },
	    chckisnum:function(a) {
	        if (a.indexOf(".") > -1) {
	            //如果有小数点
	            var b = a.split('.')[1].length;
	            if (b > 2) {
	                a = false;
	            }
	        }
	        return a;
	    },
	    showCalculator: function(){
	        var div = document.createElement("div");
	        div.id = "grey-background";
	        document.body.appendChild(div);
	        this.refs['calculator-layer'].style.display = "block";
	    },
	    hideCalculator: function(){
	        this.refs['calculator-layer'].style.display = "none"
	        document.body.removeChild(document.getElementById("grey-background"));
	    },
	    investSumHandler: function(){
	        this.refs['invest-sum'].value = this.value.replace(/[^\d.]/g,'');
	    },
	    interestHandler: function(){
	        this.refs['interest'].value = this.value.replace(/[^\d.]/g,'');
	    },
	    durationHandler: function(){
	        this.refs['duration'].value=this.value.replace(/\D/g,'');
	    },
	    calculateHandler: function(){
	        var _this = this;
	        var a = _this.refs['invest-sum'].value; //投资金额
	        if (!_this.chcknullnum(a)) {
	            alert("投资金额不能为空且只能是数字");
	            _this.refs['invest-sum'].focus();
	            return;
	        }
	        if (!_this.chckisnum(a)) {
	            alert("投资金额最多只能是两位数字！");
	            _this.refs['invest-sum'].focus();
	            return;
	        }
	        var b = _this.refs['interest'].value; //预期年化利率
	        if (!_this.chcknullnum(b)) {
	            alert("预期年化利率不能为空且只能是数字！");
	            _this.refs['interest'].focus();
	            return;
	        }
	        if (!_this.chckisnum(b)) {
	            alert("预期年化利率最多只能是两位数字！");
	            _this.refs['interest'].focus();
	            return;
	        }
	        var c = _this.refs['duration'].value; //预期年化利率
	        if (!_this.chcknullnum(c)) {
	            alert("投资期限不能为空且只能是数字！");
	            _this.refs['duration'].focus();
	            return;
	        }
	        var rm = a * 10000 * b / 100 / 360 * c;
	        //取两位小数
	        var rm2 = Math.round(rm * 100) / 100;
	        _this.refs['return-money'].innerHTML = rm2;
	        _this.refs['computer-allmoney'].innerHTML = rm2 + a * 10000;
	    },
	    resetHandler: function(){
	        var _this = this;
	        _this.refs['invest-sum'].value = "";
	        _this.refs['interest'].value = "";
	        _this.refs['duration'].value = "";
	        _this.refs['return-money'].innerHTML = "";
	        _this.refs['computer-allmoney'].innerHTML = "";
	    },
	    layerOpen:function(){
	        this.refs.calculatorLayer.layerOpen();
	    },
	    render: function(){
	        var _this = this;
	        return (
	            React.createElement("div", null, 
	                React.createElement(Layer, {ref: "calculatorLayer"}, 
	                    React.createElement("h3", {className: "alert-title", style: {cursor: "default"}}, 
	                        React.createElement("b", null), 
	                        React.createElement("span", null, "收益计算器"), 
	                        React.createElement("b", null)
	                    ), 
	                    React.createElement("div", {className: "alert-content", style: {height: "330px"}}, 
	                        React.createElement("div", {className: "alert-load"}, 
	                            React.createElement("div", {className: "layer-computer"}, 
	                                React.createElement("div", {className: "form-group"}, 
	                                    React.createElement("label", null, "投资金额："), 
	                                    React.createElement("div", {className: "input"}, React.createElement("input", {type: "text", ref: "invest-sum", className: "input-control computer-money", maxlength: "9", onkeyup: _this.investSumHandler, placeholder: "请输入投资金额"})), 
	                                    React.createElement("span", {className: "unit"}, "万元")
	                                ), 
	                                React.createElement("div", {className: "form-group"}, 
	                                    React.createElement("label", null, "预期年化利率："), 
	                                    React.createElement("div", {className: "input"}, React.createElement("input", {type: "text", ref: "interest", className: "input-control computer-bf", maxlength: "4", onkeyup: _this.interestHandler, placeholder: "请输入预期年化利率"}), React.createElement("span", {className: "unit"}, "%")
	                                    )
	                                ), 
	                                React.createElement("div", {className: "form-group"}, 
	                                    React.createElement("label", null, "投资期限："), 
	                                    React.createElement("div", {className: "input"}, 
	                                        React.createElement("input", {type: "text", ref: "duration", className: "input-control computer-data", maxlength: "4", onkeyup: _this.durationHandler, onafterpaste: "this.value=this.value.replace(/\\D/g,'')", placeholder: "请输入投资期限"}), 
	                                        React.createElement("span", {className: "unit"}, "天")
	                                    )
	                                ), 
	                                React.createElement("div", {className: "content"}, 
	                                    React.createElement("p", null, "预期收益：", React.createElement("span", {className: "return-money fcred", ref: "return-money"}), " 元"), 
	                                    React.createElement("p", null, "预期本息合计：", React.createElement("span", {className: "computer-allmoney fcred", ref: "computer-allmoney"}), " 元")
	                                ), 
	                                React.createElement("div", {className: "alert-button"}, 
	                                    React.createElement("input", {type: "button", className: "btn btn-confirm computer-button", value: "计算", onclick: _this.calculateHandler.bind(_this)}), 
	                                    React.createElement("input", {type: "reset", value: "重置", className: "btn btn-cancel computer-reset", onclick: _this.resetHandler.bind(_this)})
	                                )
	                            )
	                        )
	                    )
	                )
	            )

	        )
	    }
	});
	module.exports = Calculator;

/***/ },

/***/ 54:
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/4/25.
	 */
	var ProjectSelect = React.createClass({displayName: "ProjectSelect",
	    getDefaultProps:function(){
	        return{
	            data: {
	                label: "",
	                selectOption: [],
	                curVal: 0
	            }
	        }
	    },
	    callback: function(v){
	        this.props.callBack(v);
	    },
	    render:function(){
	        var _this = this;
	        return(
	            React.createElement("div", {className: "row"}, 
	                React.createElement("span", {className: "title"}, _this.props.data.label), 
	                React.createElement("ul", {ref: "projectStatus"}, 
	                    
	                        _this.props.data.selectOption.map(function(item,index){
	                            var className = "";
	                            if(index == 0){
	                                className = "current";
	                            }else if(index != 0 && item.value==_this.props.data.curVal){
	                                className = "curr";
	                            }
	                            return (
	                                React.createElement("li", null, React.createElement("a", {className: className, href: "javascript:;", onclick: _this.callback.bind(_this,item.value)}, item.text))
	                            )
	                        })
	                    
	                )
	            )
	        )
	    }
	});
	module.exports = ProjectSelect;

/***/ },

/***/ 55:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/4/25.
	 */
	var Progress = __webpack_require__(23);
	var InvestAction = __webpack_require__(56);
	var ProjectList = React.createClass({displayName: "ProjectList",
	    getDefaultProps:function(){
	        return{
	            projectList: []
	        }
	    },
	    render:function(){
	        var _this = this;
	        return(
	            React.createElement("div", {className: "project-list clearfix", ref: "project-list"}, 
	                
	                    _this.props.projectList.length > 0 ? (
	                        _this.props.projectList.map(function(item,index){
	                            //投资动作Props
	                            var actionData = {
	                                minFlag:item.minFlag?item.minFlag:true,
	                                flag:{
	                                    login:item.login,
	                                    loginUrl:item.loginUrl?item.loginUrl:"",
	                                    confirmUrl:item.confirmUrl?item.confirmUrl:"",
	                                    ProjectStatus:item.ProjectStatus.value?item.ProjectStatus.value:"",
	                                    JMBeginTime:item.JMBeginTime.value?item.JMBeginTime.value:"",
	                                    ProjectBeginTime:item.ProjectBeginTime.value?item.ProjectBeginTime.value:""
	                                }
	                            };
	                            return (
	                                React.createElement("div", {className: "item"}, 
	                                    React.createElement("h3", null, React.createElement("a", {href: item.login?item.confirmUrl:item.loginUrl}, item.ProjectName?item.ProjectName.value:""), (item.IsExclusive && item.IsExclusive.value == "1")?(React.createElement("span", {className: "bg-icon tag tag-zhuang "})):("")), 
	                                    React.createElement("ul", null, 
	                                        React.createElement("li", {className: "col-1"}, item.Interest?(React.createElement("span", {className: "fc-main fs18"}, React.createElement("b", null, item.Interest.value), "%")):"", item.Interest?(React.createElement("span", {className: "fc-light"}, " 年化利率")):""), 
	                                        React.createElement("li", {className: "col-2"}, item.Duration?(React.createElement("span", {className: "fc-dark fs20"}, item.Duration.value+"天")):"", item.Duration?(React.createElement("span", {className: "fc-light"}, " 项目期限")):""), 
	                                        React.createElement("li", {className: "col-3"}, item.TotalAmount?(React.createElement("span", {className: "fc-dark fs20"}, item.TotalAmount.value+"万")):"", item.TotalAmount?(React.createElement("span", {className: "fc-light"}, " 项目规模")):""), 
	                                        React.createElement("li", {className: "col-4"}, 
	                                            item.Progress?(React.createElement(Progress, {className: "progress", type: "line", percent: item.Progress.value})):"", 
	                                            item.MinAmount?(React.createElement("p", null, item.MinAmount.value, "元起投")):""
	                                        ), 
	                                        React.createElement("li", {className: "col-5"}, 
	                                            React.createElement(InvestAction, {data: actionData})
	                                        )
	                                    ), 
	                                    React.createElement("div", {className: "clear"})
	                                )
	                            )
	                        })
	                    ):(React.createElement("div", {className: "nodata"}, "项目正在筹备中，敬请期待！"))
	                
	            )
	        )
	    }
	});
	module.exports = ProjectList;

/***/ },

/***/ 56:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/4/18.
	 */
	var Countdown = __webpack_require__(9);
	var UFormatter = __webpack_require__(57);

	var InvestAction = React.createClass({displayName: "InvestAction",
	    getDefaultProps:function(){
	        return {
	            data:{
	                minFlag:true,
	                //flag:this.props.data
	                flag:{
	                    login:true,
	                    loginUrl:"",
	                    confirmUrl:"",
	                    ProjectStatus:1,
	                    JMBeginTime:"",
	                    ProjectBeginTime:"",

	                    MinInvestPartsCount:"",
	                    MaxInvestPartsCount:"",
	                    EachPartAmount:""
	                }
	            }
	        }
	    },
	    _clickHandle:function(){
	        var jmTime = new Date(UFormatter.formatTime(this.props.data.flag.JMBeginTime,"yyyy/mm/dd hh:mm:ss")).getTime();
	        if(this.props.data.flag.ProjectStatus == 3 || jmTime < new Date().getTime()){
	            return;
	        }
	        var max = Number(this.props.data.flag.MaxInvestPartsCount),
	            min = Number(this.props.data.flag.MinInvestPartsCount),
	            each = Number(this.props.data.flag.EachPartAmount),
	            surplus = max * each,
	            least = min * each;
	        if(surplus < least){
	            UDialog.alert({
	                title:'温馨提示',
	                content:'您在此项目的剩余可投金额不足，请选择其他项目'
	            });
	        }else{
	            //console.log(1)
	        }

	        var confirmUrl = this.props.data.flag.confirmUrl;
	        if(typeof confirmUrl == 'function' && confirmUrl.constructor == Function){
	            confirmUrl();
	        }
	    },
	    render:function(){
	        var _this = this;
	        var item = this.props.data.flag;
	        if(item.login == undefined){
	            item.login = true;
	        }
	        //按钮文案
	        var arrBtn = [
	                {
	                    text:"投标中",
	                    className:"btn-bidnow"
	                },
	                {
	                    text:"预热中",
	                    className:"btn-wait"
	                },
	                {
	                    text:"已满标",
	                    className:"btn-full"
	                },
	                {
	                    text:"计息中",
	                    className:"btn-full"
	                },
	                {
	                    text:"还款中",
	                    className:"btn-full"
	                },
	                {
	                    text:"已还款",
	                    className:"btn-full"
	                }
	            ];
	        if(!this.props.data.minFlag){
	            var jmTime = new Date(UFormatter.formatTime(this.props.data.flag.JMBeginTime,"yyyy/mm/dd hh:mm:ss")).getTime();
	            if(jmTime < new Date().getTime()){
	                arrBtn[2].className = "btn-disabled";
	                arrBtn[0] = arrBtn[2];
	            }else{
	                arrBtn[0].text = "马上投资";
	            }
	        }else{
	            item.login ? arrBtn[0].text = "马上投资": arrBtn[0].text = "马上登录投资"
	        }

	        var _url = "";
	        if(item.login){
	            if(item.confirmUrl && typeof item.confirmUrl == "string"){
	                _url = item.confirmUrl;
	            }else{
	                _url = "javascript:void(0)";
	            }
	        }else{
	            _url = item.loginUrl;
	        }

	        return(
	            React.createElement("div", {className: this.props.className}, 
	                this.props.data.minFlag ?
	                    React.createElement("a", {className: "btn "+arrBtn[item.ProjectStatus - 1].className, href: item.confirmUrl}, 
	                        arrBtn[item.ProjectStatus - 1].text
	                    ) :
	                    React.createElement("a", {className: "btn "+arrBtn[item.ProjectStatus - 1].className, 
	                       href: _url, 
	                       onclick: _this._clickHandle.bind(_this)}, 
	                        arrBtn[item.ProjectStatus - 1].text
	                    ), 
	                
	                
	                    item.ProjectStatus == 1 ?
	                        React.createElement("p", null, "距项目结束还有：", React.createElement(Countdown, {timeRemaining: item.JMBeginTime, tpl: "{d}天{h}小时{m}分{s}秒"})) :
	                    item.ProjectStatus == 2 ?
	                        React.createElement("p", null, "距项目开始还有：", React.createElement(Countdown, {timeRemaining: item.ProjectBeginTime, tpl: "{d}天{h}小时{m}分{s}秒"})) : ""
	                
	            )
	        )
	    }
	});
	module.exports = InvestAction;

/***/ },

/***/ 57:
/***/ function(module, exports) {

	/**
	 * 数字格式化
	 * 方法ToDigits2和formatMoney是之前后端写的，这里复制过来
	 * formaTime:
	 * @param time 日期
	 * @param [format] 格式 {"yyy-mm-dd"（默认）|"yyyy-mm-dd hh:mm:ss"|"yyyy/mm/dd"|"yyyy/mm/dd hh:mm:ss"}
	 */
	var UFormatter = (function(){
	    return {
	        ToDigits2 : function (floatVal) {
	            var strResult = parseFloat(floatVal).toFixed(4).toString();
	            return parseFloat(strResult.substr(0, strResult.length - 2));
	        },
	        formatMoney : function (m, fixedNumParm) {
	            m = m.toString();
	            var newStr = "";
	            var fixedNum = fixedNumParm || 2;
	            if (m.indexOf('.') > -1 || fixedNumParm != undefined) {
	                m = parseFloat(m);
	                var a = m.toFixed(fixedNum).split('.')[0];
	                var b = m.toFixed(fixedNum).split('.')[1];
	                if (a.length > 12) {
	                    newStr = a.substr(0, a.length - 12) + "," + a.substr(a.length - 12, 3) + "," + a.substr(a.length - 9, 3) + "," + a.substr(a.length - 6, 3) + "," + a.substr(a.length - 3, 3) + "." + b;
	                } else if (a.length > 9) {
	                    newStr = a.substr(0, a.length - 9) + "," + a.substr(a.length - 9, 3) + "," + a.substr(a.length - 6, 3) + "," + a.substr(a.length - 3, 3) + "." + b;
	                } else if (a.length > 6) {
	                    newStr = a.substr(0, a.length - 6) + "," + a.substr(a.length - 6, 3) + "," + a.substr(a.length - 3, 3) + "." + b;
	                } else if (a.length > 3) {
	                    newStr = a.substr(0, a.length - 3) + "," + a.substr(a.length - 3, 3) + "." + b;
	                } else {
	                    newStr = a + "." + b;
	                }
	            } else {
	                if (m.length > 12) {
	                    newStr = m.substr(0, m.length - 12) + "," + m.substr(m.length - 12, 3) + "," + m.substr(m.length - 9, 3) + "," + m.substr(m.length - 6, 3) + "," + m.substr(m.length - 3, 3);
	                } else if (m.length > 9) {
	                    newStr = m.substr(0, m.length - 9) + "," + m.substr(m.length - 9, 3) + "," + m.substr(m.length - 6, 3) + "," + m.substr(m.length - 3, 3);
	                } else if (m.length > 6) {
	                    newStr = m.substr(0, m.length - 6) + "," + m.substr(m.length - 6, 3) + "," + m.substr(m.length - 3, 3);
	                } else if (m.length > 3) {
	                    newStr = m.substr(0, m.length - 3) + "," + m.substr(m.length - 3, 3);
	                } else {
	                    newStr = m;
	                }
	            }
	            return newStr;
	        },
	        formatTime : function(time, format){
	            var _time = new Date(time), TArr;
	            var format = format ? format : "yyyy-mm-dd";
	            var Ddigit = function(n){
	                var _n = Number(n);
	                _n = _n > 9 ? _n : "0"+_n;
	                return _n;
	            };
	            if(typeof time == "string" && time.indexOf("-") > -1){
	                var ps = time.split(" ");
	                var pd = ps[0].split("-");
	                var pt = ps.length>1 ? ps[1].split(":"): ["00","00","00"];
	                TArr = [pd[0], Ddigit(pd[1]), Ddigit(pd[2]), Ddigit(pt[0]), Ddigit(pt[1]), Ddigit(pt[2])];
	            } else {
	                var _y = _time.getFullYear();
	                var _mon = _time.getMonth() + 1;
	                var _d = _time.getDate();
	                var _h = _time.getHours();
	                var _m = _time.getMinutes();
	                var _s = _time.getSeconds();
	                TArr = [_y, Ddigit(_mon), Ddigit(_d), Ddigit(_h), Ddigit(_m), Ddigit(_s)];
	            }
	            var TStr;
	            if(format == "yyyy-mm-dd"){
	                TStr = TArr[0] + "-" + TArr[1] + "-" + TArr[2];
	            }else if(format == "yyyy-mm-dd hh:mm:ss"){
	                TStr = TArr[0] + "-" + TArr[1] + "-" + TArr[2] + " " + TArr[3] + ":" + TArr[4] +":" + TArr[5];
	            }else if(format == "yyyy/mm/dd"){
	                TStr = TArr[0] + "/" + TArr[1] + "/" + TArr[2];
	            }else if(format == "yyyy/mm/dd hh:mm:ss"){
	                TStr = TArr[0] + "/" + TArr[1] + "/" + TArr[2] + " " + TArr[3] + ":" + TArr[4] +":" + TArr[5];
	            }
	            return TStr;
	        }
	    };
	})();
	module.exports = UFormatter;

/***/ }

/******/ });